﻿using System;
using System.Collections.Generic;
using System.Linq;

namespace WordpressRestApi
{
    /// <summary>Base class for components owning a token.</summary>
    public abstract class TokenOwnerBase
    {
        /// <summary>Constructor.</summary>
        /// <param name="token">Token owned by this component.</param>
        public TokenOwnerBase(TokenInfo token)
        {
            if (token == null)
            {
                throw new ArgumentNullException("token");
            }
            Token = token;
        }

        /// <summary>Returns a token.</summary>
        protected TokenInfo Token { get; private set; }
    }
}